/*
 * Created by JFormDesigner on Sun Nov 03 18:39:44 CST 2024
 */

package com.hafu.view;

import com.hafu.view.GYS.AddGYSFrm;
import com.hafu.view.GYS.ManageGYSFrm;
import com.hafu.view.RuKu.AddRuKuFrm;
import com.hafu.view.RuKu.QueryRuKuFrm;
import com.hafu.view.ShangPin.AddShangPinFrm;
import com.hafu.view.ShangPin.MangeShangPinFrm;
import com.hafu.view.kehu.AddKeHuFrm;
import com.hafu.view.kehu.ManageKeHuFrm;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.GroupLayout;

/**
 * @author zhaoxiaorui
 */
public class MainFrm extends JFrame {
    public MainFrm() {
        initComponents();
    }

    private void button1(ActionEvent e) {
        // TODO add your code here  显示库存页面
        KuCunFrm kuCunFrm = new KuCunFrm();
        kuCunFrm.setVisible(true);
    }

    private void button2(ActionEvent e) {
        // TODO add your code here
        AddGYSFrm addGYSFrm = new AddGYSFrm();
        addGYSFrm.setVisible(true);
    }

    private void button3(ActionEvent e) {
        // TODO add your code here
        ManageGYSFrm manageGYSFrm = new ManageGYSFrm();
        manageGYSFrm.setVisible(true);
    }

    private void button4(ActionEvent e) {
        // TODO add your code here
        AddKeHuFrm addKeHuFrm = new AddKeHuFrm();
        addKeHuFrm.setVisible(true);
    }

    private void button5(ActionEvent e) {
        // TODO add your code here
        ManageKeHuFrm manageKeHuFrm = new ManageKeHuFrm();
        manageKeHuFrm.setVisible(true);
    }

    private void button6(ActionEvent e) {
        // TODO add your code here
        AddShangPinFrm addShangPinFrm = new AddShangPinFrm();
        addShangPinFrm.setVisible(true);
    }

    private void button7(ActionEvent e) {
        // TODO add your code here
        MangeShangPinFrm mangeShangPinFrm = new MangeShangPinFrm();
        mangeShangPinFrm.setVisible(true);
    }

    private void button8(ActionEvent e) {
        // TODO add your code here
        AddRuKuFrm addRuKuFrm = new AddRuKuFrm();
        addRuKuFrm.setVisible(true);
    }

    private void button9(ActionEvent e) {
        // TODO add your code here
        QueryRuKuFrm queryRuKuFrm = new QueryRuKuFrm();
        queryRuKuFrm.setVisible(true);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        button1 = new JButton();
        button2 = new JButton();
        button3 = new JButton();
        button4 = new JButton();
        button5 = new JButton();
        button6 = new JButton();
        button7 = new JButton();
        button8 = new JButton();
        button9 = new JButton();

        //======== this ========
        setTitle("\u4e3b\u754c\u9762");
        Container contentPane = getContentPane();

        //---- button1 ----
        button1.setText("\u67e5\u8be2\u5e93\u5b58");
        button1.addActionListener(e -> {
			button1(e);
			button1(e);
		});

        //---- button2 ----
        button2.setText("\u6dfb\u52a0\u4f9b\u5e94\u5546");
        button2.addActionListener(e -> button2(e));

        //---- button3 ----
        button3.setText("\u4f9b\u5e94\u5546\u7ba1\u7406");
        button3.addActionListener(e -> button3(e));

        //---- button4 ----
        button4.setText("\u6dfb\u52a0\u5ba2\u6237");
        button4.addActionListener(e -> button4(e));

        //---- button5 ----
        button5.setText("\u5ba2\u6237\u7ba1\u7406");
        button5.addActionListener(e -> button5(e));

        //---- button6 ----
        button6.setText("\u6dfb\u52a0\u5546\u54c1");
        button6.addActionListener(e -> button6(e));

        //---- button7 ----
        button7.setText("\u5546\u54c1\u7ba1\u7406");
        button7.addActionListener(e -> button7(e));

        //---- button8 ----
        button8.setText("\u6dfb\u52a0\u5165\u5e93");
        button8.addActionListener(e -> button8(e));

        //---- button9 ----
        button9.setText("\u67e5\u8be2\u5165\u5e93");
        button9.addActionListener(e -> button9(e));

        GroupLayout contentPaneLayout = new GroupLayout(contentPane);
        contentPane.setLayout(contentPaneLayout);
        contentPaneLayout.setHorizontalGroup(
            contentPaneLayout.createParallelGroup()
                .addGroup(contentPaneLayout.createSequentialGroup()
                    .addGap(48, 48, 48)
                    .addGroup(contentPaneLayout.createParallelGroup()
                        .addComponent(button1)
                        .addGroup(contentPaneLayout.createSequentialGroup()
                            .addGroup(contentPaneLayout.createParallelGroup()
                                .addComponent(button2)
                                .addComponent(button4)
                                .addComponent(button6)
                                .addComponent(button8))
                            .addGap(67, 67, 67)
                            .addGroup(contentPaneLayout.createParallelGroup()
                                .addComponent(button7)
                                .addComponent(button5)
                                .addComponent(button3)
                                .addComponent(button9))))
                    .addContainerGap(570, Short.MAX_VALUE))
        );
        contentPaneLayout.setVerticalGroup(
            contentPaneLayout.createParallelGroup()
                .addGroup(contentPaneLayout.createSequentialGroup()
                    .addGap(28, 28, 28)
                    .addComponent(button1)
                    .addGap(41, 41, 41)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
                        .addComponent(button3)
                        .addComponent(button2))
                    .addGap(39, 39, 39)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(button4)
                        .addComponent(button5))
                    .addGap(48, 48, 48)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(button6)
                        .addComponent(button7))
                    .addGap(48, 48, 48)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(button8)
                        .addComponent(button9))
                    .addContainerGap(144, Short.MAX_VALUE))
        );
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JButton button1;
    private JButton button2;
    private JButton button3;
    private JButton button4;
    private JButton button5;
    private JButton button6;
    private JButton button7;
    private JButton button8;
    private JButton button9;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
